import {
    Navigate
} from 'react-router-dom'
import React from 'react'
let Onec = React.lazy(()=>import('../components/Onec'))
let Twoc =React.lazy(()=>import('../components/Twoc')) 
let Threec =React.lazy(()=>import('../components/Threec')) 
let Info =React.lazy(()=>import('../views/info')) 
let Infoc =React.lazy(()=>import('../views/infoc')) 
let Login =React.lazy(()=>import('../views/login')) 
let Home =React.lazy(()=>import('../views/home')) 
let Allyu1 =React.lazy(()=>import('../views/allyu1')) 
let Allyu2 =React.lazy(()=>import('../views/allyu2')) 
let Allyu3 =React.lazy(()=>import('../views/allyu3')) 
let Setyu1 =React.lazy(()=>import('../views/setyu1')) 
let Setyu2 =React.lazy(()=>import('../views/setyu2')) 

const routers = [{
        path: "/onec/*",
        element: <Onec></Onec>,
        children:[
            {
                path: "/home",
                element: <Home></Home>,
            },
            {
                path: "/allyu1",
                element: <Allyu1></Allyu1>,
            },
            {
                path: "/allyu2",
                element: <Allyu2></Allyu2>,
            },
            {
                path: "/allyu3",
                element: <Allyu3></Allyu3>,
            },
            {
                path: "/setyu1",
                element: <Setyu1></Setyu1>,
            },
            {
                path: "/setyu2",
                element: <Setyu2></Setyu2>,
            },
        ]
    },
    {
        path: "/twoc",
        element: <Twoc></Twoc>,
    },
    {
        path: "/threec",
        element: <Threec></Threec>,
    },
    {
        path: "/info/:id",
        element: <Info></Info>,
    },
    {
        path: "/infoc",
        element: <Infoc></Infoc>,
    },
    {
        path: "/login",
        element: <Login></Login>,
    },
    
    {
        path: "/",
        element: <Navigate to = "/login"/> ,
    },
    {
        path: "/*",
        element: <Onec></Onec> ,
    },
]

export default routers